package ttt;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-09-29
 * Time: 21:55
 */
public class Main3 {
    public static void main(String []args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if( n<=2) {
            System.out.print(-1);
            return ;
        }
        int [][]arr = new int[n][2*n];
        int mid = n-1;

        arr[0][mid] = 1;
        arr[1][mid] = 1;
        arr[1][mid-1] = 1;
        arr[1][mid+1] = 1;
        for( int i=2; i<n;i++) {
            if( mid-i >= 0 && mid+i < 2*n) {
                arr[i][mid-i] =1;
                arr[i][mid+i] =1;
            }

        }
        for(int i=2;i<n;i++) {
            for(int j=1;j<2*n-1;j++) {
                arr[i][j] = arr[i-1][j-1] + arr[i-1][j] + arr[i-1][j+1];
            }
        }

        for( int i =0;i<2*n;i++) {
            if( arr[n-1][i]!=0 && arr[n-1][i] %2 == 0 ) {
                System.out.print(i+1);
                return ;
            }
        }
        System.out.print(-1);

    }
}
